#ifndef CONSUMERWORKER_H
#define CONSUMERWORKER_H

#include <QObject>
#include <QString>
#include <QMutex>
#include <QMutexLocker>
#include <QWaitCondition>
#include "SpectroMeter/spectrometerdata.h"

class ConsumerWorker : public QObject
{
    Q_OBJECT
public:
    ConsumerWorker(const QString &dirName, const QString &firshSN, const QString &tail, int pixelNumbers, AvsMeasResultList *measuredData, QMutex *measMutex, QWaitCondition *measCondition, bool *stop);
    void transposeCsv(const QString &inputFilePath, const QString &outputFilePath);
signals:
    void finished();
    void processingFinished(const QString &statusMessage);

public slots:
    void process();
    void process1();//按行保存

private:
    QString _dirName;
    QString _firstSN;
    QString _tail;
    AvsMeasResultList *_measuredData;
    QMutex *_measMutex;
    QWaitCondition *_measCondition;
    bool *_stop;
    int _pixelNumbers;

};

#endif // CONSUMERWORKER_H
